<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BScreenCreateService
 *
 * @author ID59C
 */
class BScreenCreateService extends BUIScreen {

    //put your code here
    public function render($data = null) {        
        
        //change serviceAppTopBar to new view
        $this->setRenderView(BUIServiceApp::View_ServiceAppTopBar, 'createService_AppTopBar');
        
        $model = new CreateServiceFormModel('createService');

        if (isset($_POST['CreateServiceFormModel'])) {
            $model->attributes = $_POST['CreateServiceFormModel'];
        }

        if ($this->isAjaxLinkClicked('completeBtn')) {
            $this->addRenderView('createServiceSummary', 'createServiceSummary', array('screen' => $this));
            $this->startRender();
        }
        
        if ($this->isAjaxLinkClicked('nextBtn')) {
            $this->addRenderView('createServiceSummary', 'createServiceSummary', array('screen' => $this));
            $this->startRender();
        }
        
        $this->addRenderView('createService1', 'createServiceView1', array('screen' => $this, 'model' => $model));
    }

}

?>
